package com.secfound.soccer.server.tools;

import java.text.SimpleDateFormat;
import java.util.Date;

import com.secfound.soccer.shared.db.Game;

/**
 * Functions used in game processing
 * @author alfonso.ayala
 *
 */
public class GameTools {
	public static boolean hasEnded(Game realGame) {
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss");
		String currentTime = sdf.format(new Date());	
		boolean result=false;
		if(currentTime.compareTo( realGame.getStartTime())>0  ){
			result=true;
		}
		return result;
	}
}
